Scripts - Scripts Other
|
|
|
Browser
Redirect
back to top
This coding lets you create a page that detects the visitor's browser
and automatically loads a specific page depending on which browser
is being used.
<Script>
version=parseInt(navigator.appVersion);
if (navigator.appVersion.indexOf('5.')>-1){version=5}; browser='OTHER';
if (navigator.appName=='Netscape'){browser='NS'+version;}
if (navigator.appName=='Microsoft Internet Explorer'){browser='MSIE'+version;}
if (navigator.appVersion.indexOf('MSIE 3')>0) {browser='MSIE3';}
if (browser == 'NS5'){browser='NS6'};
if (browser=='MSIE3') {window.location='http://www.YOUR_MSIE3_SITE.com'}
if (browser=='MSIE4') {window.location='http://www.YOUR_MSIE4_SITE.com'}
if (browser=='MSIE5') {window.location='http://www.YOUR_MSIE5_SITE.com'}
if (browser=='MSIE6') {window.location='http://www.YOUR_MSIE6_SITE.com'}
if (browser=='NS3') {window.location='http://www.YOUR_NETSCAPE3_SITE.com'}
if (browser=='NS4') {window.location='http://www.YOUR_NETSCAPE4_SITE.com'}
if (browser=='NS6') {window.location='http://www.YOUR_NETSCAPE6_SITE.com'}
if (browser=='OTHER') {window.location='http://www.YOUR_OTHER_SITE.com'}
</Script>
Please Note: There is no specific coding available for Netscape
5 browsers. |
|
Custom
Scrollbar
back to top
This coding customizes the appearance of the scrollbar on your page.
<Style>
body {
scrollbar-arrow-color: ARROW_COLOR ;
scrollbar-base-color: BASE_COLOR ;
scrollbar-dark-shadow-color: DARK_SHADOW_COLOR ;
scrollbar-track-color: SCROLLBAR_BACKGROUND_COLOR ;
scrollbar-face-color: SCROLLBAR_FRONT_COLOR ;
scrollbar-shadow-color: SHADOW_COLOR ;
scrollbar-highlight-color: HIGHLIGHT_COLOR ;
scrollbar-3d-light-color: 3D_LIGHT_COLOR ;
}
</Style>
Please Note: This coding will only work for Internet Explorer
browser. It will not cause any harm if viewed on Netscape browsers.
Color Picker --> |
|
Force
Sizing
back to top
Create a page that forces the size to 800x600 even if your size is
1024x768.
<Script Language="JavaScrip">
<!--
self.moveTo(0,0);
self.resizeTo(800,600);
//-->
</Script>
You may use this inplace of the size (800, 600), to force full screen
display.
(screen.availWidth,screen.availHeight)
|
|
Page
Redirect
back to top
This coding redirects the page to another address after a set time.
Changing the number in the coding sets the timing.
<META http-equiv="refresh" content="3;url=http://URL">
|
|
Screen
Redirect
back to top
This coding lets you create a page that detects the visitor's screen
resolution and automatically loads a specific page depending on which
resolution is being used.
<Script>
var width = screen.width;
var res=(((!(640-width))*1)+((!(800-width))*2)+((!(1024-width))*3)+((!(1152-width))*4)+((!(1280-width))*5)+((!(1600-width))*6));
if(!(res)) res = 1;
if (res=='1') {window.location='http://www.YOUR_640_SITE.com'}
if (res=='2') {window.location='http://www.YOUR_800_SITE.com'}
if (res=='3') {window.location='http://www.YOUR_1024_SITE.com'}
if (res!='1' && res!='2' && res!='3') {window.location='http://www.YOUR_OTHER_SITE.com'}
</Script>
|
|
Safe
Email
back to top
This script can prevent a program or robot from finding an email address
and recording it for spam purposes. The script disguises the email
address in the sites HTML coding.
<script language="javascript"><!--
document.write('<a href=mailto:' + 'NAME'
+ '@' + 'DOMAIN.com>NAME'
+ '@' + 'DOMAIN.com</a>.')
//--></script>
|
|
Pop-Under
back to top
This coding will open another window and hide it below the opening
page.
Insert this coding between the <HEAD> </HEAD> tags.
<script>
var popunder=new Array()
popunder[0]="http://www.URL.com"
var width = '800';
var height = '580';
var p = 'scrollbars=yes,resizable=yes,toolbar=yes,' + //these
are obvious variables. set "yes" or "no".
'menubar=yes,status=yes,location=yes,left=85,top=20,height='
+ //yes/no, & the
screen location height + ',width=' + width;
var one_time=0
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if the cookie exists
offset += search.length
end = document.cookie.indexOf(";", offset); // set the index
of beginning value
if (end == -1) // set the index of the end of cookie value
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}
function loadornot(){
if (get_cookie('popunder')==''){
load_pop_power()
document.cookie="popunder=yes"
}
}
function load_pop_power(){
win2=window.open(popunder[Math.floor(Math.random()*(popunder.length))],"bw",p)
win2.blur()
window.focus()
}
if (one_time==0)
load_pop_power()
else
loadornot()
</script>
Please Note: Be sure to change the URL to the propper address.
You also may change the window size to your liking.
|
|
Pop-Up
Entry
back to top
This coding will open another window when entering a site.
Insert this coding between the <HEAD></HEAD> tags.
<script>
<!--
popup1=window.open("http://www.URL.com","popup1","toolbar=0,location=0,status=0,menubar=0,
scrollbars=0,resizable=1,width=320,height=200");
// -->
</script>
|
|
Pop-Up
Exit
back to top
This coding will open another window when exiting a site.
Insert this coding between the <HEAD> </HEAD> tags.
<SCRIPT LANGUAGE="Javascript">
<!-- HIDE SCRIPT FROM OLD BROWSERS
// OPEN EXIT CONSOLE
var q=1;
function exit1() {
if (q==1) window.open("http://www.URL.com","timexet");
self.focus();}
// STOP HIDING SCRIPT FROM OLD BROWSERS -->
</SCRIPT>
This piece of coding needs to be inserted into the <BODY> tag
in order for the Exit Pop-Up to work.
ONUNLOAD="exit1();"
eg: <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000" ONUNLOAD="exit1();"> |
|
|
|
Click here to return home. |